<%@ Page Language="C#" MasterPageFile="~/sbMembership.Master" AutoEventWireup="true"
    Inherits="sbMembership.Web.Default" Title="Untitled Page" Codebehind="Default.aspx.cs" %>

<%@ Register Src="~/Views/EditUserView.ascx" TagName="EditUserView" TagPrefix="uc7" %>
<%@ Register Src="~/Views/EditRoleView.ascx" TagName="EditRoleView" TagPrefix="uc6" %>
<%@ Register Src="~/Views/AssignRolesToUserView.ascx" TagName="AssignRolesToUserView"
    TagPrefix="uc5" %>
<%@ Register Src="~/Views/ListRolesView.ascx" TagName="ListRolesView" TagPrefix="uc4" %>
<%@ Register Src="~/Views/AddRoleView.ascx" TagName="AddRoleView" TagPrefix="uc3" %>
<%@ Register Src="~/Views/AddUserView.ascx" TagName="AddUserView" TagPrefix="uc2" %>
<%@ Register Src="~/Views/ListUsersView.ascx" TagName="ListUsersView" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="MainUpdatePanel" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <asp:Button runat="server" ID="hiddenTargetControlForAddUser" Style="display: none" />
            <ajaxToolkit:ModalPopupExtender ID="AddUserModalPopupExtender" runat="server" TargetControlID="hiddenTargetControlForAddUser"
                PopupControlID="pnlAddUser" OkControlID="btnAddUserClose" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Button runat="server" ID="hiddenTargetControlForAddRole" Style="display: none" />
            <ajaxToolkit:ModalPopupExtender ID="AddRoleModalPopupExtender" runat="server" TargetControlID="hiddenTargetControlForAddRole"
                PopupControlID="pnlAddRole" OkControlID="btnAddRoleClose" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Button runat="server" ID="hiddenTargetControlForAssignRole" Style="display: none" />
            <ajaxToolkit:ModalPopupExtender ID="AssignRoleModalPopupExtender" runat="server" TargetControlID="hiddenTargetControlForAssignRole"
                PopupControlID="pnlAssignRoleToUser" OkControlID="btnAssignRoleClose" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Button runat="server" ID="hiddenTargetControlForEditRole" Style="display: none" />
            <ajaxToolkit:ModalPopupExtender ID="EditRoleModalPopupExtender" runat="server" TargetControlID="hiddenTargetControlForEditRole"
                PopupControlID="pnlEditRole" OkControlID="btnEditRoleClose" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <asp:Button runat="server" ID="hiddenTargetControlForEditUser" Style="display: none" />
            <ajaxToolkit:ModalPopupExtender ID="EditUserModalPopupExtender" runat="server" TargetControlID="hiddenTargetControlForEditUser"
                PopupControlID="pnlEditUser" OkControlID="btnEditUserClose" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <ajaxToolkit:CollapsiblePanelExtender ID="cpeUser" runat="server" TargetControlID="User_ContentPanel"
                ExpandControlID="User_HeaderPanel" CollapseControlID="User_HeaderPanel" Collapsed="False"
                ImageControlID="User_ToggleImage" ExpandedImage="~/Assets/images/collapse.jpg"
                CollapsedImage="~/Assets/images/expand.jpg" />
            <ajaxToolkit:CollapsiblePanelExtender ID="cpeRole" runat="server" TargetControlID="Role_ContentPanel"
                ExpandControlID="Role_HeaderPanel" CollapseControlID="Role_HeaderPanel" Collapsed="False"
                ImageControlID="Role_ToggleImage" ExpandedImage="~/Assets/images/collapse.jpg"
                CollapsedImage="~/Assets/images/expand.jpg" />
            <asp:Panel ID="User_HeaderPanel" runat="server" Style="cursor: pointer;">
                <div class="heading">
                    <asp:ImageButton ID="User_ToggleImage" runat="server" ImageUrl="~/Assets/Images/collapse.jpg"
                        AlternateText="collapse" />
                    User Management
                </div>
            </asp:Panel>
            <asp:Panel ID="User_ContentPanel" runat="server" Style="overflow: hidden;">
                <asp:UpdatePanel ID="MemberGridUpdatePanel" UpdateMode="Conditional" runat="server">
                    <ContentTemplate>
                        <uc1:ListUsersView ID="ListUsersView1" runat="server" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="Role_HeaderPanel" runat="server" Style="cursor: pointer;">
                <div class="heading">
                    <asp:ImageButton ID="Role_ToggleImage" runat="server" ImageUrl="~/Assets/Images/collapse.jpg"
                        AlternateText="collapse" />
                    Role Management
                </div>
            </asp:Panel>
            <asp:Panel ID="Role_ContentPanel" runat="server" Style="overflow: hidden;">
                <asp:UpdatePanel ID="RoleGridUpdatePanel" UpdateMode="Conditional" runat="server">
                    <ContentTemplate>
                        <uc4:ListRolesView id="ListRolesView1" runat="server" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlAddUser" runat="server" Style="display: none" CssClass="modalPopup">
                <div class="modalHeader">
                    <asp:ImageButton ID="btnAddUserClose" runat="server" ImageUrl="~/Assets/Images/silk/cancel.png"
                        AlternateText="Close" CssClass="modalHeaderButton" />
                </div>
                <div class="modalInner">
                    <asp:UpdatePanel ID="AddUserUpdatePanel" runat="server">
                        <ContentTemplate>
                            <uc2:AddUserView ID="AddUserView1" runat="server"></uc2:AddUserView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlAddRole" runat="server" Style="display: none" CssClass="modalPopup">
                <div class="modalHeader">
                    <asp:ImageButton ID="btnAddRoleClose" runat="server" ImageUrl="~/Assets/Images/silk/cancel.png"
                        AlternateText="Close" CssClass="modalHeaderButton" />
                </div>
                <div class="modalInner">
                    <asp:UpdatePanel ID="AddRoleUpdatePanel" runat="server">
                        <ContentTemplate>
                            <uc3:AddRoleView ID="AddRoleView1" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlAssignRoleToUser" runat="server" Style="display: none" CssClass="modalPopup">
                <div class="modalHeader">
                    <asp:ImageButton ID="btnAssignRoleClose" runat="server" ImageUrl="~/Assets/Images/silk/cancel.png"
                        AlternateText="Close" CssClass="modalHeaderButton" />
                </div>
                <div class="modalInner" style="width:640px; height: 480px;">
                    <asp:UpdatePanel ID="AssignRoleUpdatePanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                    <uc5:AssignRolesToUserView ID="AssignUserToRoleView1" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlEditRole" runat="server" Style="display: none" CssClass="modalPopup">
                <div class="modalHeader">
                    <asp:ImageButton ID="btnEditRoleClose" runat="server" ImageUrl="~/Assets/Images/silk/cancel.png"
                        AlternateText="Close" CssClass="modalHeaderButton" />
                </div>
                <div class="modalInner">
                    <asp:UpdatePanel ID="EditRoleUpdatePanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <uc6:EditRoleView id="EditRoleView1" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlEditUser" runat="server" Style="display: none" CssClass="modalPopup">
                <div class="modalHeader">
                    <asp:ImageButton ID="btnEditUserClose" runat="server" ImageUrl="~/Assets/Images/silk/cancel.png"
                        AlternateText="Close" CssClass="modalHeaderButton" />
                </div>
                <div class="modalInner">
                    <asp:UpdatePanel ID="EditUserUpdatePanel" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <uc7:EditUserView id="EditUserView1" runat="server">
                            </uc7:EditUserView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
